<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <script src="d3.v5.min.js"></script>
  <style>
    .container {
      width: 200px;
      height: 200px;
      background: #efefef;
    }
  </style>
</head>

<body>
  <div id="app"></div>
  <div></div>


  <script>
    // var container = d3.select("#app");
    // var container = d3.select("div");
    // var container = d3.selectAll("div");
    // var container = d3.select("#app");
    var container = d3.selectAll("div");
    container.text('hello world')
      .style('color', 'red')
      .style('font-size', '50px')
      .attr('class', 'container')
  </script>

</body>

</html>